;;; init-programming.el -- init cpp
;;; Commentary:
;;; Code:

;; line
;;(add-hook 'prog-mode-hook (lambda () (setq display-line-numbers 't)))

;; whitspace
;;(add-hook 'prog-mode-hook (lambda () (setq-default show-trailing-whitespace 't)))

;; space
(add-hook 'prog-mode-hook (lambda () (setq-default indent-tabs-mode 'nil)))
(add-hook 'prog-mode-hook (lambda () (setq-default tab-width 4)))

;; rainbow
(use-package rainbow-delimiters
  :hook (prog-mode . rainbow-delimiters-mode))

;; yasnippet
(use-package yasnippet
  :hook (prog-mode . yas-minor-mode)
  :config
  (use-package yasnippet-snippets)
  (yas-reload-all))

;; magit
(use-package magit
  :bind ("C-x g" . magit-status))

;; projectile
(use-package projectile
  :hook (prog-mode . projectile-mode)
  :bind (:map projectile-mode-map
	      ("C-c p" . projectile-command-map))
  :config
  (use-package helm-projectile
    :config
    (setq projectile-completion-system 'helm)
    (helm-projectile-on)))

;; company
(use-package company
  :hook (prog-mode . company-mode)
  :config (setq completion-ignore-case t))

;; flycheck
(use-package flycheck
  :hook (prog-mode . flycheck-mode))
(use-package flycheck-eglot
  :after (flycheck eglot)
  :config
  (global-flycheck-eglot-mode 1))

;; yafolding
(use-package yafolding
  :hook (prog-mode . yafolding-mode)
  :bind ("C-c f" . yafolding-toggle-element))

;; langage
(require 'init-python)
(require 'init-scala)
(require 'init-java)
(require 'init-json)
(require 'init-cpp)
(require 'init-sql)
(require 'init-shell)

(provide 'init-programming)

;;; init-programming.el ends here
